﻿@using Insya.NetDash
@if (Request.IsAuthenticated) {
    <text>
        @Html.Localize("Hello"), @Html.ActionLink(User.Identity.Name, "Logout", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })!
        @using (Html.BeginForm("Logout", "Account", FormMethod.Post, new { id = "logoutForm" }))
        {
            @Html.AntiForgeryToken()
            <a href="javascript:document.getElementById('logoutForm').submit()">@Html.Localize("LogOff")</a>
        }
    </text>
} else {
    <ul>
        <li>@Html.ActionLink(Html.Localize("Register").ToHtmlString(), "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink(Html.Localize("LogIn").ToHtmlString(), "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
